package com.tttn.docbao.activity;

import com.tttn.docbao.R;
import com.tttn.docbao.R.id;
import com.tttn.docbao.R.layout;
import com.tttn.docbao.R.menu;
import android.support.v7.app.ActionBarActivity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebSettings;
import android.webkit.WebView;

public class ReadActivity extends ActionBarActivity {
	private WebView wvcontent;

	@SuppressLint("NewApi")
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_read);
		Intent intent = getIntent();
		String link = intent.getStringExtra("link");
		wvcontent = (WebView) findViewById(R.id.content);
		wvcontent.getSettings().setSupportZoom(true);
		wvcontent.setInitialScale(1);
		wvcontent.getSettings().setLoadWithOverviewMode(true);
		wvcontent.getSettings().setUseWideViewPort(true);
		wvcontent.setScrollBarStyle(wvcontent.SCROLLBARS_OUTSIDE_OVERLAY);
		wvcontent.setScrollbarFadingEnabled(false);
		wvcontent.getSettings().setBuiltInZoomControls(true);
		wvcontent.loadUrl(link);
		WebSettings settings = wvcontent.getSettings();
		settings.setTextZoom(settings.getTextZoom() + 150);
	}

}
